package com.ruoyi.common.entity.CoreEntity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 库存变动日志对象 stock_change_log
 * 
 * @author yfk
 * @date 2025-08-07
 */
public class StockChangeLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 关联商户信息表id（逻辑外键，关联store_info.id） */
    @Excel(name = "关联商户信息表id", readConverterExp = "逻=辑外键，关联store_info.id")
    private Long storeInfoId;

    /** 商品SKU ID（逻辑外键，关联sku.id） */
    @Excel(name = "商品SKU ID", readConverterExp = "逻=辑外键，关联sku.id")
    private Long skuId;

    /** 变动类型（1采购入库，2销售出库，3锁定，4解锁，5调拨） */
    @Excel(name = "变动类型", readConverterExp = "1=采购入库，2销售出库，3锁定，4解锁，5调拨")
    private Long changeType;

    /** 变动数量（正数为增加，负数为减少） */
    @Excel(name = "变动数量", readConverterExp = "正=数为增加，负数为减少")
    private Long changeQuantity;

    /** 变更前库存 */
    @Excel(name = "变更前库存")
    private Long beforeQuantity;

    /** 变更后库存 */
    @Excel(name = "变更后库存")
    private Long afterQuantity;

    /** 业务来源ID（如订单、采购单等） */
    @Excel(name = "业务来源ID", readConverterExp = "如=订单、采购单等")
    private Long referenceId;

    /** 操作人ID（管理员、系统等） */
    @Excel(name = "操作人ID", readConverterExp = "管=理员、系统等")
    private Long operatorId;

    /** 逻辑删除标志（0-未删除，1-已删除） */
    @Excel(name = "逻辑删除标志", readConverterExp = "0=-未删除，1-已删除")
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setStoreInfoId(Long storeInfoId) 
    {
        this.storeInfoId = storeInfoId;
    }

    public Long getStoreInfoId() 
    {
        return storeInfoId;
    }

    public void setSkuId(Long skuId) 
    {
        this.skuId = skuId;
    }

    public Long getSkuId() 
    {
        return skuId;
    }

    public void setChangeType(Long changeType) 
    {
        this.changeType = changeType;
    }

    public Long getChangeType() 
    {
        return changeType;
    }

    public void setChangeQuantity(Long changeQuantity) 
    {
        this.changeQuantity = changeQuantity;
    }

    public Long getChangeQuantity() 
    {
        return changeQuantity;
    }

    public void setBeforeQuantity(Long beforeQuantity) 
    {
        this.beforeQuantity = beforeQuantity;
    }

    public Long getBeforeQuantity() 
    {
        return beforeQuantity;
    }

    public void setAfterQuantity(Long afterQuantity) 
    {
        this.afterQuantity = afterQuantity;
    }

    public Long getAfterQuantity() 
    {
        return afterQuantity;
    }

    public void setReferenceId(Long referenceId) 
    {
        this.referenceId = referenceId;
    }

    public Long getReferenceId() 
    {
        return referenceId;
    }

    public void setOperatorId(Long operatorId) 
    {
        this.operatorId = operatorId;
    }

    public Long getOperatorId() 
    {
        return operatorId;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("storeInfoId", getStoreInfoId())
            .append("skuId", getSkuId())
            .append("changeType", getChangeType())
            .append("changeQuantity", getChangeQuantity())
            .append("beforeQuantity", getBeforeQuantity())
            .append("afterQuantity", getAfterQuantity())
            .append("referenceId", getReferenceId())
            .append("operatorId", getOperatorId())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .toString();
    }
}
